package com.gemme.gemme.util;

import java.text.SimpleDateFormat;
import java.time.format.DateTimeFormatter;
import java.util.Date;

/**
 * @Author: yangcheng
 * @CreateDate: 2020/8/28 17:02
 */
public class GmDateUtil {
   public static SimpleDateFormat format_ymdhms = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");


    /**
     * 字符串转date
     * @param str
     * @param format format
     * @return 时间
     */
    public static Date stringToDate(String str, SimpleDateFormat format){
        Date date = null;
        try {
            date = format.parse(str);
        }catch (Exception e){

        }
        return date;
    }
}
